//
//  NSString+HJ.h
//  0105-新浪微博(01)
//
//  Created by 黄杰 on 15/1/7.
//  Copyright (c) 2015年 黄杰. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (HJ)

// 在文件名后拼接一段字符串（扩展名不变）
- (NSString *)fileNameAppendString:(NSString *)str;

// 将时间戳转成时间
+ (NSString *)stringFromTimestamp:(NSString *)timestamp formatter:(NSString *)formatter;

// MD5加密
- (NSString *)MD5;

// 邮箱验证
+ (BOOL)isValidateEmail:(NSString *)email;

// 手机号码验证
+ (BOOL)isValidateMobile:(NSString *)mobile;

// 汉字转拼音
+ (NSString *)phonetic:(NSString*)sourceString;

// 浮点数相成
+ (NSString *)decimalNumberMutiplyWithString:(NSString *)multiplierValue andOtherString:(NSString *)multiplicandValue;

// 浮点数相加
+ (NSString *)decimalNumberByAdding:(NSString *)multiplierValue andOtherString:(NSString *)multiplicandValue;

// 浮点数想减
+ (NSString *)decimalNumberBySubtracting:(NSString *)multiplierValue andOtherString:(NSString *)multiplicandValue;

// 四舍五入
+ (NSString *)notRounding:(float)price afterPoint:(int)position;

// 判断是否为空值
+ (NSString *)nullWithStr:(NSString *)str;

// 如果空值返回0
+ (NSString *)zeroWithStr:(NSString *)str;

@end
